package cn.fscode.code.generator.common;

import cn.fscode.commons.tool.core.file.FileUtils;

import java.io.File;

/**
 * @author shenguangyang
 */
public class GenConstants {
    public static final String BOOL_TRUE = "1";
    public static final String BOOL_FALSE = "0";

    public static final String FORWARD_INDEX = "/fe/index.html";

    public static final String DOWNLOAD_PATH = "data/download";
    public static final String TEMP_PATH = "data/temp";
    public static final String UPLOAD_PATH = "data/temp";

    static {
        FileUtils.mkdirs(new File(DOWNLOAD_PATH));
        FileUtils.mkdirs(new File(TEMP_PATH));
        FileUtils.mkdirs(new File(UPLOAD_PATH));
    }

    public static String getBoolStr(String str) {
        return BOOL_TRUE.equals(str) ? BOOL_TRUE : BOOL_FALSE;
    }
}
